Enjoy Soun♩Trax on your website!
The play routine library is a 30kb download (+ 9kb for fflate upzip library)
Embed JavaScript like this:
<script src="fflate.js"></script>
<script src="soundtrax.js"></script>
<script>
music.jig( '/path/to/your.jsong' ).then( song=>{
console.log( song );
song.play(0).then(x=>song.stop().then(y=>{ // play and stop are Promises
song.fade(5,67) // fade-in over 5 seconds to volume 67/100
setTimeout(z=>song.fade(-5,false), 9e3) // fade-out over 5 seconds
}))
} )
</script>
Commands:
play: start song at given position
fade: volume fade music in/out
stop: stop music and disconnect machines
pause: pause/unpause playback (machines stay alive)